package pers.kw.server.controller;

import io.swagger.annotations.Api;
import org.springframework.web.bind.annotation.RestController;
import pers.kw.protocol.R;
import pers.kw.server.service.StorageService;
import pers.kw.storage.api.StorageApi;
import pers.kw.storage.dto.UpdateStorageReqDto;

import javax.annotation.Resource;

@Api(tags = "库存服务")
@RestController
public class StorageController implements StorageApi {

    @Resource
    private StorageService storageService;

    @Override
    public R<String> updateStorage(UpdateStorageReqDto reqDto) {
        storageService.updateStorage(reqDto);
        return R.ok("更新库存成功");
    }
}
